load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

proto_library(
    name = "keyvispb_proto",
    srcs = ["key_visualizer.proto"],
    strip_import_prefix = "/pkg",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/roachpb:roachpb_proto",
        "@com_github_gogo_protobuf//gogoproto:gogo_proto",
        "@com_google_protobuf//:timestamp_proto",
        "@go_googleapis//google/api:annotations_proto",
    ],
)

go_proto_library(
    name = "keyvispb_go_proto",
    compilers = ["//pkg/cmd/protoc-gen-gogoroach:protoc-gen-gogoroach_grpc_compiler"],
    importpath = "github.com/cockroachdb/cockroach/pkg/keyvisualizer/keyvispb",
    proto = ":keyvispb_proto",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/roachpb",
        "@com_github_gogo_protobuf//gogoproto",
        "@org_golang_google_genproto//googleapis/api/annotations:go_default_library",
    ],
)

go_library(
    name = "keyvispb",
    embed = [":keyvispb_go_proto"],
    importpath = "github.com/cockroachdb/cockroach/pkg/keyvisualizer/keyvispb",
    visibility = ["//visibility:public"],
)
